//
//  CostInfoTableViewCell.m
//  GoodWayClient
//
//  Created by HuiDong on 15/12/8.
//  Copyright © 2015年 HuiDong. All rights reserved.
//

#import "CostInfoTableViewCell.h"

@interface CostInfoTableViewCell ()
@property (weak, nonatomic) IBOutlet UILabel *all;
@property (weak, nonatomic) IBOutlet UILabel *integral;
@property (weak, nonatomic) IBOutlet UILabel *freight;
@property (weak, nonatomic) IBOutlet UILabel *commission;
@property (weak, nonatomic) IBOutlet UILabel *tax;
@property (weak, nonatomic) IBOutlet UILabel *realPay;


@end

@implementation CostInfoTableViewCell

- (void)awakeFromNib {
    // Initialization code
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

+ (instancetype) CostInfoWithTableView:(UITableView *)tableView
{
    static NSString *identifier = @"cell";
    CostInfoTableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:identifier];
    if (cell == nil) {
        cell = [[[NSBundle mainBundle] loadNibNamed:@"CostInfoTableViewCell" owner:nil options:nil] lastObject];
    }
    return cell;
}

- (void)setDic:(NSDictionary *)dic
{
    _dic = dic;
    self.all.text = dic[@"all"];
    self.integral.text = dic[@"integral"];
    self.freight.text = dic[@"freight"];
    self.commission.text = dic[@"commission"];
    self.tax.text = dic[@"tax"];
    self.realPay.text = dic[@"realPay"];
}

@end
